Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Size: px
Start display at page:

Download "Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון"

Transcription

1 Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

2 2 Recap: Actor Model An actor is a mapping of input signals to output signals S: R R k R R m where k is the number of input signals and m is the number of output signals u 1 u k S y 1 y m

3 3 Recap: Discrete Signals A signal e is discrete if there exists a one-to-one function f: t R: e t absent N that is order preserving, i.e., that t 1 t 2 f(t 1 ) f(t 2 ).

4 4 Example: Garage Counter Arrival Detector Departure Detector arrival Counter u up Σ i d down departure c count Display The counter actor has two input ports, up and down, both are pure signals. It has one output port, count, whose type is Z Formally: Counter i : absent, present R + {up, down} absent Z R +

5 5 State Space The state y(t) of the Integrator at time t is a real number. Hence, we say that the state space of the Integrator is States = R. For the Counter, the state s(t) at time t is an integer, so States Z. A practical parking garage has a finite and non-negative number M of spaces, so the state space for the Counter actor used in this way will be States = 0, 1, 2,, M. The state space for the Integrator is infinite (uncountable, in fact). The state space for the garage counter is finite. Discrete models with finite state spaces are called finite-state machines (FSMs). There are powerful analysis techniques available for such models, so we consider them next.

6 6 Finite State Machines If the number of states is reasonably small, then FSMs can be conveniently drawn using a graphical notation: guard / action State2 State1 Initial state indicator State3 Here, each state is represented by a bubble, so for this diagram, the set of states is given by States = {State1, State2, State3}. At the beginning of each sequence of reactions, there is an initial state, State1, indicated in the diagram by a dangling arrow into it.

7 7 Transitions Transitions between states govern the discrete dynamics of the state machine and the mapping of input valuations to output valuations. A transition is represented as an arrow going from one state to another. A transition may also start and end at the same state, as illustrated with State3 in the figure. In this case, the transition is called a self transition. State3

8 8 Guards and Actions The transition from State1 to State2 is labeled with guard / action. State1 guard / action State2 The guard specifies when the transition may be taken on a reaction. The action specifies what outputs are produced on each reaction. A guard is a predicate (a Boolean-valued expression) that evaluates to true when the transition should be taken, changing the state from that at the beginning of the transition to that at the end. When a guard evaluates to true we say that the transition is enabled. An action is an assignment of values (or absent) to the output ports. Any output port not mentioned in a transition that is taken is implicitly absent. If no action at all is given, then all outputs are implicitly absent.

9 9 Example: An FSM model for the garage counter Inputs: up, down pure Output: count {0,, M} up down / 1 up down / 2 up down / 3 up down / M M down up / 0 down up / 1 down up / 2 down up / M 1

10 10 Example: An FSM model for the garage counter The inputs and outputs are shown using the notation name type. The set of states is States = {0,1,2,, M}. The transition from state 0 to 1 has a guard written as up down. This is a predicate that evaluates to true when up is present and down is absent. If at a reaction the current state is 0 and this guard evaluates to true, then the transition will be taken and the next state will be 1. Moreover, the action indicates that the output should be assigned the value1. The output port count is not explicitly named because there is only one output port, and hence there is no ambiguity. If the guard expression on the transition from 0 to 1 had been simply up, then this could evaluate to true when down is also present, which would incorrectly count cars when a car was arriving at the same time that another was departing.

11 11 Example If p 1 and p 2 are pure inputs to a discrete system, then the following are examples of valid guards: true p 1 p 1 p 1 p 2 p 1 p 2 p 1 p 2 Transition is always enabled Transition is enabled if p 1 is present Transition is enabled if p 1 is absent Transition is enabled if both p 1 and p 2 are present Transition is enabled if either p 1 or p 2 is present Transition is enabled if p 1 is present and p 2 is absent These are standard logical operators where present is taken as a synonym for true and absent as a synonym for false. The symbol represents logical negation. The operator is logical conjunction (logical AND), and is logical disjunction (logical OR).

12 12 Suppose that in addition the discrete system has a third input port p 3 with type V p3 = N. Then the following are examples of valid guards: p 3 Transition is enabled if p 3 is present (not absent) p 3 = 1 Transition is enabled if p 3 is present and has value 1 p 3 = 1 p 1 Transition is enabled if p 3 has value 1 and p 1 is present p 3 > 5 Transition is enabled if p 3 is present with value greater than 5

13 13 A model of a thermostat A major use of energy worldwide is in heating, ventilation, and air conditioning (HVAC) systems. Accurate models of temperature dynamics and temperature control systems can significantly improve energy conservation. Such modeling begins with a thermostat, which regulates temperature to maintain a set point, or target temperature. The word thermostat comes from Greek words for hot and to make stand. Consider a thermostat modeled by an FSM with States = {heating, cooling} Input: temperature R Output: heaton, heatoff pure temperature 18 / heaton cooling heating temperature 22 / heatoff

14 14 A model of a thermostat Suppose the set point is 20 degrees Celsius. If the heater is on, then the thermostat allows the temperature to rise past the set point to 22 degrees. If the heater is off, then it allows the temperature to drop past the set point to 18 degrees. This strategy is called hysteresis. It avoids chattering, where the heater would turn on and off rapidly when the temperature is close to the set point temperature. There is a single input temperature with type R and two pure outputs heaton and heatoff. These outputs will be present only when a change in the status of the heater is needed (i.e., when it is on and needs to be turned off, or when it is off and needs to be turned on).

15 15 Time vs. Event Triggered The FSM for the thermostat could be event triggered, like the garage counter, In which case it will react whenever a temperature input is provided. Alternatively, it could be time triggered, meaning that it reacts at regular time intervals. The definition of the FSM does not change in these two cases. It is up to the environment in which an FSM operates when it should react.

16 16 Actions On a transition, the action (which is the portion after the slash) specifies the resulting valuation on the output ports when a transition is taken. If q 1 and q 2 are pure outputs and q3 has type N, then the following are examples of valid actions: q 1 q 1, q 2 q 1 is present and q 2 and q 3 are absent q 1 and q 2 are both present and q 3 is absent q 3 1 q 1 and q 2 are absent and q 3 is present with value 1. q 3 1, q 1 q 1 is present, q 2 is absent, and q 3 is present with value 1. (nothing) q 1, q 2, and q 3 are all absent. Any output port that is not mentioned in a transition that is taken is implicitly absent. When assigning a value to an output port we use the notation name: = value to distinguish the assignment from a predicate, which would be written name = value. If there is only one output, then the assignment need not mention the port name.

17 17 When a Reaction Occurs Nothing in the definition of a state machine constrains when it reacts. The environment determines when the machine reacts. We will describe later a variety of mechanisms and give a precise meaning to terms like event triggered and time triggered. For now, however, we just focus on what the machine does when it reacts.

18 18 Reaction When the environment determines that a state machine should react, the inputs will have a valuation. The state machine will assign a valuation to the output ports and (possibly) change to a new state. If no guard on any transition out of the current state evaluates to true, then the machine will remain in the same state. It is possible for all inputs to be absent at a reaction. Even in this case, it may be possible for a guard to evaluate to true, in which case a transition is taken. If the input is absent and no guard on any transition out of the current state evaluates to true, then the machine will stutter. A stuttering reaction is one where the inputs and outputs are all absent and the machine does not change state. No progress is made and nothing changes.

19 19 Example In the counter example, if on any reaction both inputs are absent The machine will stutter. If we are in state 0 and the input down is present, then the guard on the only outgoing transition is false, and the machine remains in the same state. However, we do not call this a stuttering reaction because the inputs are not all absent.

20 20 Car arrival when count = 0 Our informal description of the garage counter did not explicitly state what would happen if the count was at 0 and a car departed. A major advantage of FSM models is that they define all possible behaviors. The FSM model for the garage counter defines what happens in this circumstance. The count remains at 0. As a consequence, FSM models are amenable to formal checking, which determines whether the specified behaviors are in fact desirable behaviors. The informal specification cannot be subjected to such tests, or at least, not completely.

21 21 Default Transitions Although it may seem that the FSM model does not define what happens if the state is 0 and down is present, it does so implicitly the state remains unchanged and no output is generated. The reaction is not shown explicitly in the diagram. Sometimes it is useful to emphasize such reactions, in which case they can be shown explicitly. A convenient way to do this is using a default transition: true / up down / 1 0 down up / 0 The default transition is denoted with dashed lines and is labeled with true /. A default transition is enabled if no non-default transition is enabled and if its guard evaluates to true. In the above figure, therefore, the default transition is enabled if up down evaluates to false, and when the default transition is taken the output is absent.

22 22 Default Priorities Are Syntactic Sugar Default transitions provide a convenient notation, but they are not really necessary. Syntactic Sugar: Any default transition can be replaced by an ordinary transition with an appropriately chosen guard. For example, we could use a transition with guard (up down).

23 23 Priorities The use of both ordinary transitions and default transitions in a diagram can be thought of as a way of assigning priority to transitions. An ordinary transition has priority over a default transition. When both have guards that evaluate to true, the ordinary transition prevails. Some formalisms for state machines support more than two levels of priority. For example SyncCharts associates with each transition an integer priority. This can make guard expressions simpler, at the expense of having to indicate priorities in the diagrams

24 24 Software Tools Supporting FSMs FSMs have been used in theoretical computer science and software engineering for quite some time. A number of software tools support design and analysis of FSMs: Statecharts (Harel, 1987), a notation for concurrent composition of hierarchical FSMs, has influenced many of these tools. One of the first tools supporting the Statecharts notation is STATEMATE (Harel et al., 1990), which subsequently evolved into Rhapsody and Rational Rose, sold by IBM. Many variants of Statecharts have evolved (von der Beeck,1994), and some variant is now supported by nearly every software engineering tool that provides UML (unified modeling language) capabilities (Booch et al., 1998). SyncCharts (Andre, 1996) is a particularly nice variant in that it borrows the rigorous semantics of Esterel (Berry and Gonthier, 1992) for composition of concurrent FSMs. LabVIEW supports a variant of Statecharts that can operate within dataflow diagrams MATLAB/Simulink with its Stateflow extension supports a variant that can operate within continuous-time models.

25 25 Mathematical Notation The graphical notation for FSMs defines a specific mathematical model of the dynamics of a state machine. A mathematical notation with the same meaning as the graphical notation sometimes proves convenient, particularly for large state machines where the graphical notation becomes cumbersome. In such a mathematical notation, a finite-state machine is a five-tuple: where States is a finite set of states Inputs is the set of input valuations States, Inputs, Outputs, update, initialstate Outputs is the set of output valuations update : States Inputs States Outputs is an update function, mapping a state and an input valuation to a next state and an output valuation; initialstate States is the initial state

26 26 Reactions The FSM progresses in a sequence of reactions. At each reaction, the FSM has a current state, and the reaction may transition to a next state, which will be the current state of the next reaction. We can number these states starting with 0 for the initial state. Specifically, let s: N States be a function that gives the state of an FSM at reaction n N. Initially, s(0) = initialstate. Let x: N Inputs and y: N Outputs denote that input and output valuations at each reaction. Hence, x(0) Inputs is the first input valuation and y(0) Outputs is the first output valuation. The dynamics of the state machine are given by the following equation: s n + 1, y n = update(s(n), x(n)) This gives the next state and output in terms of the current state and input. update encodes all the transitions, guards, and output specifications in an FSM. The term transition function is often used in place of update function.

27 27 Inputs and Output Valuations The input and output valuations also have a natural mathematical form. Suppose an FSM has input ports P = p P has a corresponding type V p. p 1,, p N, where each Then Inputs is a set of functions of the form i: P V p1 V pn absent where for each p P, i(p) V p absent gives the value of port p. Thus, a function i Inputs is a valuation of the input ports. We can define valuations for the output ports in a similar way.

28 28 Example: The Garage Counter The Garage Counter FSM can be mathematically represented as follows: States = 0, 1,, M Inputs = present, absent up,down Outputs = 0, 1,, M, absent count initialstate = 0 The update function is given by update s, i = for all s States and i Inputs. s + 1, s + 1 if s < M i up = present i down = absent s 1, s 1 if s > 0 i up = absent i down = present s, absent otherwise Note that an output valuation o Outputs is a function of the form o: count {0, 1,, M, absent}. The first alternative gives the output valuation as o = s + 1, which we take to mean the constant function that for all q Q = {count} yields o(q) = s + 1. When there is more than one output port we will need to be more explicit about which output value is assigned to which output port. In such cases, we can use the same notation that we use for actions in the diagrams.

29 29 Determinacy A state machine is said to be deterministic if, for each state, there is at most one transition enabled by each input value. The formal definition of an FSM given above ensures that it is deterministic, since update is a function, not a one-to many mapping. The graphical notation with guards on the transitions, however, has no such constraint. Such a state machine will be deterministic only if the guards leaving each state are nonoverlapping. Note that a deterministic state machine is determinate, meaning that given the same inputs it will always produce the same outputs. However, not every determinate state machine is deterministic.

30 30 Receptiveness A state machine is said to be receptive if, for each state, there is at least one transition possible on each input symbol. In other words, receptiveness ensures that a state machine is always ready to react to any input, and does not get stuck in any state. The formal definition of an FSM given above ensures that it is receptive, since update is a function, not a partial function. It is defined for every possible state and input value. Moreover, in our graphical notation, since we have implicit default transitions, we have ensured that all state machines specified in our graphical notation are also receptive. It follows that if a state machine is both deterministic and receptive, for every state, there is exactly one transition possible on each input value.

Finite State Machines. CS 447 Wireless Embedded Systems

Finite State Machines. CS 447 Wireless Embedded Systems Finite State Machines CS 447 Wireless Embedded Systems Outline Discrete systems Finite State Machines Transitions Timing Update functions Determinacy and Receptiveness 1 Discrete Systems Operates in sequence

More information

Cyber-Physical Systems Discrete Dynamics

Cyber-Physical Systems Discrete Dynamics Cyber-Physical Systems Discrete Dynamics ICEN 553/453 Fall 2018 Prof. Dola Saha 1 Discrete Systems Ø Discrete = individually separate / distinct Ø A discrete system is one that operates in a sequence of

More information

Embedded Real-Time Systems

Embedded Real-Time Systems Embedded Real-Time Systems Reinhard von Hanxleden Christian-Albrechts-Universität zu Kiel Based on slides kindly provided by Edward A. Lee & Sanjit Seshia, UC Berkeley, Copyright 2008-11, All rights reserved

More information

Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal.

Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal. Embedded Systems 2 REVIEW: Actor models A system is a function that accepts an input signal and yields an output signal. The domain and range of the system function are sets of signals, which themselves

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Edward A. Lee & Sanjit A. Seshia UC Berkeley EECS 124 Spring 2008 Copyright 2008, Edward A. Lee & Sanjit A. Seshia, All rights reserved Lecture 7: Modeling Modal Behavior,

More information

Embedded Systems 5. Synchronous Composition. Lee/Seshia Section 6.2

Embedded Systems 5. Synchronous Composition. Lee/Seshia Section 6.2 Embedded Systems 5-1 - Synchronous Composition Lee/Seshia Section 6.2 Important semantic model for concurrent composition Here: composition of actors Foundation of Statecharts, Simulink, synchronous programming

More information

Embedded Systems Development

Embedded Systems Development Embedded Systems Development Lecture 2 Finite Automata & SyncCharts Daniel Kästner AbsInt Angewandte Informatik GmbH kaestner@absint.com Some things I forgot to mention 2 Remember the HISPOS registration

More information

TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1. Grzegorz Łabiak

TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1. Grzegorz Łabiak TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1 Grzegorz Łabiak Computer Engineering & Electronics Department, University of Zielona Góra, Podgórna 50, 65-246 Zielona Góra, Poland.

More information

Laurea Specialistica in Ingegneria. Ingegneria dell'automazione: Sistemi in Tempo Reale

Laurea Specialistica in Ingegneria. Ingegneria dell'automazione: Sistemi in Tempo Reale Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Luigi Palopoli email: palopoli@sssup.it Tel. 050 883444 Selected topics on discrete time and sampleddata systems Outline Finite

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Edward A. Lee & Sanjit A. Seshia UC Berkeley EECS 124 Spring 2008 Copyright 2008, Edward A. Lee & Sanjit A. Seshia, All rights reserved Lecture 6: Modeling Modal Behavior,

More information

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI Stavros Tripakis Aalto University and University of California, Berkeley Abstract FMI (Functional Mockup Interface) is a standard

More information

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI Stavros Tripakis David Broman Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report

More information

Data Mining and Machine Learning

Data Mining and Machine Learning Data Mining and Machine Learning Concept Learning and Version Spaces Introduction Concept Learning Generality Relations Refinement Operators Structured Hypothesis Spaces Simple algorithms Find-S Find-G

More information

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic Propositional logic Logical connectives Rules for wffs Truth tables for the connectives Using Truth Tables to evaluate

More information

Continuous Dynamics Solving LTI state-space equations גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Continuous Dynamics Solving LTI state-space equations גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון Continuous Dynamics Solving LTI state-space equations גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון 2 State Space Models For a causal system with m inputs u t R m and p outputs y t R p, an nth-order

More information

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional logic (revision) & semantic entailment. p. 1/34 Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)

More information

CS 2800: Logic and Computation Fall 2010 (Lecture 13)

CS 2800: Logic and Computation Fall 2010 (Lecture 13) CS 2800: Logic and Computation Fall 2010 (Lecture 13) 13 October 2010 1 An Introduction to First-order Logic In Propositional(Boolean) Logic, we used large portions of mathematical language, namely those

More information

The STATEMATE Semantics of Statecharts. Presentation by: John Finn October 5, by David Harel

The STATEMATE Semantics of Statecharts. Presentation by: John Finn October 5, by David Harel The STATEMATE Semantics of Statecharts Presentation by: John Finn October 5, 2010 by David Harel Outline Introduction The Basics System Reactions Compound Transitions History Scope of Transitions Conflicting

More information

Information System Design IT60105

Information System Design IT60105 n IT60105 Lecture 13 Statechart Diagrams Lecture #13 What is a Statechart diagram? Basic components in a state-chart diagram and their notations Examples: Process Order in OLP system What is a Statechart

More information

{},{a},{a,c} {},{c} {c,d}

{},{a},{a,c} {},{c} {c,d} Modular verication of Argos Programs Agathe Merceron 1 and G. Michele Pinna 2 1 Basser Department of Computer Science, University of Sydney Madsen Building F09, NSW 2006, Australia agathe@staff.cs.su.oz.au

More information

With Question/Answer Animations. Chapter 2

With Question/Answer Animations. Chapter 2 With Question/Answer Animations Chapter 2 Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Sequences and Summations Types of

More information

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

More information

Model-Based Design. Chapter Modeling Physical Dynamics Newtonian Mechanics

Model-Based Design. Chapter Modeling Physical Dynamics Newtonian Mechanics Chapter 1 Model-Based Design Models of cyber-physical systems must include both the physical parts and the computing and networking parts. The models will typically need to represent both static and dynamic

More information

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims Introduction INTRODUCTION TO LOGIC 2 Syntax and Semantics of Propositional Logic Volker Halbach In what follows I look at some formal languages that are much simpler than English and define validity of

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

A Deterministic Logical Semantics for Esterel

A Deterministic Logical Semantics for Esterel SOS 2004 Preliminary Version A Deterministic Logical Semantics for Esterel Olivier Tardieu 1 NRA Sophia Antipolis, France Abstract Esterel is a synchronous design language for the specification of reactive

More information

Linear Temporal Logic and Büchi Automata

Linear Temporal Logic and Büchi Automata Linear Temporal Logic and Büchi Automata Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 Yih-Kuen Tsay (SVVRL @ IM.NTU) Linear Temporal Logic and Büchi Automata

More information

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

Symbolic Verification of Hybrid Systems: An Algebraic Approach

Symbolic Verification of Hybrid Systems: An Algebraic Approach European Journal of Control (2001)71±16 # 2001 EUCA Symbolic Verification of Hybrid Systems An Algebraic Approach Martin v. Mohrenschildt Department of Computing and Software, Faculty of Engineering, McMaster

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

A test sequence selection method for statecharts

A test sequence selection method for statecharts SOFTWARE TESTING, VERIFICATION AND RELIABILITY Softw. Test. Verif. Reliab. 2000; 10: 203 227 A test sequence selection method for statecharts Hyoung Seok Hong 1,*, Young Gon Kim 1, Sung Deok Cha 1,*, Doo

More information

Time-bounded computations

Time-bounded computations Lecture 18 Time-bounded computations We now begin the final part of the course, which is on complexity theory. We ll have time to only scratch the surface complexity theory is a rich subject, and many

More information

Stochastic Histories. Chapter Introduction

Stochastic Histories. Chapter Introduction Chapter 8 Stochastic Histories 8.1 Introduction Despite the fact that classical mechanics employs deterministic dynamical laws, random dynamical processes often arise in classical physics, as well as in

More information

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14 0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents

More information

Opus: University of Bath Online Publication Store

Opus: University of Bath Online Publication Store Lam, V. S. W. (2006) A formal execution semantics and rigorous analytical approach for communicating UML statechart diagrams. Other. Department of Computer Science, University of Bath. Link to official

More information

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model)

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model) TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica Final exam Logic & Set Theory (2IT61) (correction model) Thursday November 4, 2016, 9:00 12:00 hrs. (2) 1. Determine whether the abstract

More information

Chapter 4: Classical Propositional Semantics

Chapter 4: Classical Propositional Semantics Chapter 4: Classical Propositional Semantics Language : L {,,, }. Classical Semantics assumptions: TWO VALUES: there are only two logical values: truth (T) and false (F), and EXTENSIONALITY: the logical

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 10:18 Caltech 101b.2 January-March 2004 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. the assignment

More information

Mathematical Foundations of Logic and Functional Programming

Mathematical Foundations of Logic and Functional Programming Mathematical Foundations of Logic and Functional Programming lecture notes The aim of the course is to grasp the mathematical definition of the meaning (or, as we say, the semantics) of programs in two

More information

State Machines Composition

State Machines Composition State Machines Composition Marco Di Natale marco@sssup.it Derived from original set by L. Palopoli @ Uni Trento Synchrony Each state machine in the composition reacts to external inputs simultaneously

More information

Propositional Logic and Semantics

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

More information

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate

More information

Propositional and Predicate Logic - II

Propositional and Predicate Logic - II Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS 1 Language There are several propositional languages that are routinely called classical propositional logic languages. It is due to the functional dependency

More information

Fuzzy Propositional Logic for the Knowledge Representation

Fuzzy Propositional Logic for the Knowledge Representation Fuzzy Propositional Logic for the Knowledge Representation Alexander Savinov Institute of Mathematics Academy of Sciences Academiei 5 277028 Kishinev Moldova (CIS) Phone: (373+2) 73-81-30 EMAIL: 23LSII@MATH.MOLDOVA.SU

More information

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics

More information

An Introduction to Hybrid Systems Modeling

An Introduction to Hybrid Systems Modeling CS620, IIT BOMBAY An Introduction to Hybrid Systems Modeling Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS620: New Trends in IT: Modeling and Verification of Cyber-Physical

More information

First Order Logic: Syntax and Semantics

First Order Logic: Syntax and Semantics irst Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Logic Recap You should already know the basics of irst Order Logic (OL) It s a prerequisite of this course!

More information

Math From Scratch Lesson 29: Decimal Representation

Math From Scratch Lesson 29: Decimal Representation Math From Scratch Lesson 29: Decimal Representation W. Blaine Dowler January, 203 Contents Introducing Decimals 2 Finite Decimals 3 2. 0................................... 3 2.2 2....................................

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as: 3.4 THE CONDITIONAL & BICONDITIONAL Definition. Any statement that can be put in the form If p, then q, where p and q are basic statements, is called a conditional statement and is written symbolically

More information

Introduction: Computer Science is a cluster of related scientific and engineering disciplines concerned with the study and application of computations. These disciplines range from the pure and basic scientific

More information

Chapter Two: Finite Automata

Chapter Two: Finite Automata Chapter Two: Finite Automata In theoretical computer science, automata theory is the study of abstract machines (or more appropriately, abstract 'mathematical' machines or systems) and the computational

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Propositional logic. First order logic. Alexander Clark. Autumn 2014 Propositional logic First order logic Alexander Clark Autumn 2014 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and

More information

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1)

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1) Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1) Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group http://moves.rwth-aachen.de/teaching/ws-1415/uml/

More information

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 Neil D. Jones DIKU 2005 Some slides today new, some based on logic 2004 (Nils Andersen), some based on kernebegreber (NJ 2005) PREDICATE LOGIC:

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross

More information

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

More information

[read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] General-to-specific ordering over hypotheses

[read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] General-to-specific ordering over hypotheses 1 CONCEPT LEARNING AND THE GENERAL-TO-SPECIFIC ORDERING [read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] Learning from examples General-to-specific ordering over hypotheses Version spaces and

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Failure Diagnosis of Discrete-Time Stochastic Systems subject to Temporal Logic Correctness Requirements

Failure Diagnosis of Discrete-Time Stochastic Systems subject to Temporal Logic Correctness Requirements Failure Diagnosis of Discrete-Time Stochastic Systems subject to Temporal Logic Correctness Requirements Jun Chen, Student Member, IEEE and Ratnesh Kumar, Fellow, IEEE Dept. of Elec. & Comp. Eng., Iowa

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

Infinite Truth-Functional Logic

Infinite Truth-Functional Logic 28 Notre Dame Journal of Formal Logic Volume 29, Number 1, Winter 1988 Infinite Truth-Functional Logic THEODORE HAILPERIN What we cannot speak about [in K o or fewer propositions] we must pass over in

More information

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic CHAPER 1 MAHEMAICAL LOGIC 1.1 undamentals of Mathematical Logic Logic is commonly known as the science of reasoning. Some of the reasons to study logic are the following: At the hardware level the design

More information

Lecture 12: Core State Machines II

Lecture 12: Core State Machines II Software Design, Modelling and Analysis in UML Lecture 12: Core State Machines II 2015-12-15 12 2015-12-15 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

cse541 LOGIC FOR COMPUTER SCIENCE

cse541 LOGIC FOR COMPUTER SCIENCE cse541 LOGIC FOR COMPUTER SCIENCE Professor Anita Wasilewska Spring 2015 LECTURE 2 Chapter 2 Introduction to Classical Propositional Logic PART 1: Classical Propositional Model Assumptions PART 2: Syntax

More information

Bounded Retransmission in Event-B CSP: a Case Study

Bounded Retransmission in Event-B CSP: a Case Study Available online at www.sciencedirect.com Electronic Notes in Theoretical Computer Science 280 (2011) 69 80 www.elsevier.com/locate/entcs Bounded Retransmission in Event-B CSP: a Case Study Steve Schneider

More information

UNIT-I. Strings, Alphabets, Language and Operations

UNIT-I. Strings, Alphabets, Language and Operations UNIT-I Strings, Alphabets, Language and Operations Strings of characters are fundamental building blocks in computer science. Alphabet is defined as a non empty finite set or nonempty set of symbols. The

More information

Propositional and Predicate Logic

Propositional and Predicate Logic Formal Verification of Software Propositional and Predicate Logic Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Verification of Software p.1 Propositional Logic: Syntax Special symbols

More information

Introducing Proof 1. hsn.uk.net. Contents

Introducing Proof 1. hsn.uk.net. Contents Contents 1 1 Introduction 1 What is proof? 1 Statements, Definitions and Euler Diagrams 1 Statements 1 Definitions Our first proof Euler diagrams 4 3 Logical Connectives 5 Negation 6 Conjunction 7 Disjunction

More information

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML) Where are we? Systeme hoher Sicherheit und Qualität Universität Bremen, WS 2017/2018 Lecture 05: High-Level Design with SysML Christoph Lüth, Dieter Hutter, Jan Peleska 01: Concepts of Quality 02: Legal

More information

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1 Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1 In its most basic form, a mathematical proof is just a sequence of mathematical statements, connected to each other by strict

More information

Chapter 11: Automated Proof Systems

Chapter 11: Automated Proof Systems Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are

More information

Design of Embedded Systems: Models, Validation and Synthesis (EE 249) Lecture 9

Design of Embedded Systems: Models, Validation and Synthesis (EE 249) Lecture 9 Design of Embedded Systems: Models, Validation and Synthesis (EE 249) Lecture 9 Prof. Dr. Reinhard von Hanxleden Christian-Albrechts Universität Kiel Department of Computer Science Real-Time Systems and

More information

A Sample State Machine

A Sample State Machine A Sample State Machine Environment Signatures An environment signature is a triple of sets of guards, actions, and messages. H = (G H, A H, M H ) Guards: formulas in some logical language, e.g. OCL. Actions

More information

Synchronous circuits, Automata, Parallel composition

Synchronous circuits, Automata, Parallel composition Synchronous circuits, Automata, Parallel composition Marc Pouzet École normale supérieure Marc.Pouzet@ens.fr MPRI, October 28, 2014 MPRI 2.23-1 Systèmes Synchrones, Marc Pouzet November 28, 2014, page

More information

Logic for Computer Science - Week 2 The Syntax of Propositional Logic

Logic for Computer Science - Week 2 The Syntax of Propositional Logic Logic for Computer Science - Week 2 The Syntax of Propositional Logic Ștefan Ciobâcă November 30, 2017 1 An Introduction to Logical Formulae In the previous lecture, we have seen what makes an argument

More information

Propositional Language - Semantics

Propositional Language - Semantics Propositional Language - Semantics Lila Kari University of Waterloo Propositional Language - Semantics CS245, Logic and Computation 1 / 41 Syntax and semantics Syntax Semantics analyzes Form analyzes Meaning

More information

Programming Languages and Types

Programming Languages and Types Programming Languages and Types Klaus Ostermann based on slides by Benjamin C. Pierce Where we re going Type Systems... Type systems are one of the most fascinating and powerful aspects of programming

More information

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

More information

Georg Frey ANALYSIS OF PETRI NET BASED CONTROL ALGORITHMS

Georg Frey ANALYSIS OF PETRI NET BASED CONTROL ALGORITHMS Georg Frey ANALYSIS OF PETRI NET BASED CONTROL ALGORITHMS Proceedings SDPS, Fifth World Conference on Integrated Design and Process Technologies, IEEE International Conference on Systems Integration, Dallas,

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Equivalence of Regular Expressions and FSMs

Equivalence of Regular Expressions and FSMs Equivalence of Regular Expressions and FSMs Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Regular Language Recall that a language

More information

CHAPTER 1: Functions

CHAPTER 1: Functions CHAPTER 1: Functions 1.1: Functions 1.2: Graphs of Functions 1.3: Basic Graphs and Symmetry 1.4: Transformations 1.5: Piecewise-Defined Functions; Limits and Continuity in Calculus 1.6: Combining Functions

More information

Notes on induction proofs and recursive definitions

Notes on induction proofs and recursive definitions Notes on induction proofs and recursive definitions James Aspnes December 13, 2010 1 Simple induction Most of the proof techniques we ve talked about so far are only really useful for proving a property

More information

Lecture 7. Logic. Section1: Statement Logic.

Lecture 7. Logic. Section1: Statement Logic. Ling 726: Mathematical Linguistics, Logic, Section : Statement Logic V. Borschev and B. Partee, October 5, 26 p. Lecture 7. Logic. Section: Statement Logic.. Statement Logic..... Goals..... Syntax of Statement

More information

Linear Temporal Logic (LTL)

Linear Temporal Logic (LTL) Chapter 9 Linear Temporal Logic (LTL) This chapter introduces the Linear Temporal Logic (LTL) to reason about state properties of Labelled Transition Systems defined in the previous chapter. We will first

More information

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland Discrete Mathematics W. Ethan Duckworth Fall 2017, Loyola University Maryland Contents 1 Introduction 4 1.1 Statements......................................... 4 1.2 Constructing Direct Proofs................................

More information

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Typeset September 23, 2005 1 Statements or propositions Defn: A statement is an assertion

More information

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom. Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes

More information

540 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 4, APRIL Algorithmic Analysis of Nonlinear Hybrid Systems

540 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 4, APRIL Algorithmic Analysis of Nonlinear Hybrid Systems 540 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 4, APRIL 1998 Algorithmic Analysis of Nonlinear Hybrid Systems Thomas A. Henzinger, Pei-Hsin Ho, Howard Wong-Toi Abstract Hybrid systems are digital

More information

Logical reasoning - Can we formalise our thought processes?

Logical reasoning - Can we formalise our thought processes? Logical reasoning - Can we formalise our thought processes? Why study (mathematical) logic? Logic: the science or method of reasoning Logical: able to reason correctly Human reasoning poorly understood,

More information

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007 198:538 Complexity of Computation Lecture 16 Rutgers University, Spring 2007 8 March 2007 In this lecture we discuss Shamir s theorem that PSPACE is the set of languages that have interactive proofs with

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

15414/614 Optional Lecture 1: Propositional Logic

15414/614 Optional Lecture 1: Propositional Logic 15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,

More information

Comparing State Machines: Equivalence and Refinement

Comparing State Machines: Equivalence and Refinement Chapter 14 Comparing State Machines: Equivalence and Refinement Hongwei Zhang http://www.cs.wayne.edu/~hzhang/ Ack.: this lecture is prepared in part based on slides of Lee, Sangiovanni-Vincentelli, Seshia.

More information